package com.spzx.product.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.api.domain.Brand;
import com.spzx.product.api.fallback.BrandFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * @ClassName BrandFeignClient
 * @Author 波
 * @Date 2024/8/5 18:33
 */
@FeignClient(contextId = "brandFeignClient", path = "/brand", value = ServiceNameConstants.PRODUCT_SERVICE, fallbackFactory = BrandFeignClientFallbackFactory.class)
public interface BrandFeignClient {

    @GetMapping("/getBrandAll")
    public R<List<Brand>> getBrandAll(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
